package com.hopu.springmvc.service.impl;

import com.hopu.springmvc.dao.IUserDAO;
import com.hopu.springmvc.entity.User;
import com.hopu.springmvc.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户Service实现
 */
@Service
public class UserServiceImpl implements IUserService {

    //注入DAO层对象
    @Autowired
    private IUserDAO userDAO;

    @Override
    public User login(String username, String password) {
        return userDAO.login(username,password);
    }

    @Override
    public List<User> queryAllUsers() {
        return userDAO.queryAllUsers();
    }
}
